package models

import (
	"github.com/beego/beego/v2/client/orm"
	_ "github.com/go-sql-driver/mysql"
)

type GoodsJi struct { //技师表
	Id     int
	Name   string  //姓名
	Price  float32 //价格
	Time   int     //服务时长
	Status string  //服务状态
}
type Order struct { //订单表
	Id    int
	Cn    string
	Name  string  //姓名
	Price float32 //价格
	Time  int     //服务时长
	Num   int     //服务数量
	Sum   int     //总价
}

var o orm.Ormer

func init() {
	orm.RegisterDriver("mysql", orm.DRMySQL)
	orm.RegisterDataBase("default", "mysql", "root:root@tcp(127.0.0.1:3306)/shang")
	orm.RegisterModel(new(Order), new(GoodsJi))
	orm.RunSyncdb("default", false, true)
	orm.Debug = true
	o = orm.NewOrm()
}
